1. Introduction SOFTGRID is a demonstration of how to create something like GRID.VBX without using it. It also shows a neat way of displaying an array of user defined types without much new code. The same ideas in the code could be used with GRID.VBX. Feel free to distribute and use the code for non- commercial education use. Features of SOFTGRID are: 1. the user can to choose which fields (columns) to be displayed at runtime. 2. the table can be displayed sorted on any columns as chosen by the user. 3. the user can size individual columns. 4. columns can best fitted to the data or the current form width. 2. How to modify SOFTGRID for your own arrays You do not need much code to modify SOFTGRID to display an array of your own user defined types. All the code that starts with 'GRID' manages the grid. The code starting with 'My' can be changed for each user defined type. Normally I just copy SOFTGRID.FRM and modify it for the new type. Below is the minimum changes needed for a new type: Dim MyData() As testRecord Change the declaration of MyData() for the type you want to use. Const MyIniFileName = "vb-grid.ini" Const MyIniSectionPrefix = "vb-grid" Change these constants for the INI file and INI section name you want to use. sub myFields_GetFieldNames Change the field names in this routine to match the field names in your user defined type. Function myFields_Init_b () As Integer Load MyData(). Set the size of MyData() with MyDataNb. Sorting by fields If you have the registered version of AAVBSORT.DLL then change testRecord_ut and SortIdxTestRecord to match the user defined type of MyData(). Otherwise comment out references to SortIdxTestRecord. 3. Copyright 1994, AA-Software International Distributed for non-commercial educational use only. For other use contact: AA-Software International 12 ter Domaine Du Bois Joli 06330 Roquefort-Les-Pins, France Tel: (+33) 93.77.50.47 Fax: (+33) 93.77.19.78 Internet: cswilly@acm.org CompuServe: 100343,2570